Skip to content

Preserve independent images in multimodal prompts - #17

Merged
da03 merged 1 commit into
mainfrom
independent-image-tokenization
Oct 18, 2026
Merged

da03 merged 1 commit into
mainfrom
independent-image-tokenization

Conversation

@da03

@da03 da03 commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Adjacent, same-size image arguments can be merged into a temporal image chunk by the native Qwen backend. A PAW function trained on independent images then receives a different representation, despite having the correct prompt and weights.

Tokenize each image occurrence separately and evaluate the resulting chunks in order. Preserve all literal prompt text, whitespace, image order and repeated references; do not insert separators or wrap the prompt in another template. Text-only and single-image calls retain their existing behavior.

Validation:

  • The complete hermetic test selection from .github/workflows/test.yml passes locally on Python 3.12.
  • The adjacent-image regression fails against unpatched main and passes with this change. Existing tests cover exact prompt text, repeated/reordered images, text-only calls, context limits and cleanup on failures.
  • Native Mac/Qwen3.5-0.8B diagnostic with unchanged weights, prompt and 220 reviewed image pairs: exact matches improved from 74/220 to 216/220. This is a training-fit/runtime discrepancy check, not held-out accuracy or gameplay validation.

Only the runtime fix and its tests are included. No version bump or package release.

@da03
da03 merged commit 190eb85 into main Oct 18, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant